{% extends "base.html" %}

{% block title %}{{ object.title }}{% endblock %}

{% block content %}

<h1>{{ object.title }}</h1>
<div class="gallery-photo">
    <a href="{{ object.get_image_url }}"><img src="{{ object.get_display_url }}" alt="{{ object.title }}"/></a>
</div>
{% if object.galleries.all %}
<h2>This photo is found in the following galleries:</h2>
<ol>
{% for gallery in object.galleries.all %}
    <li><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></li>
{% endfor %}
</ol>
{% endif %}

{% endblock %}
